package booking.pages;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import static booking.utils.Locators.*;

public class ControlPanelPage extends BasePage{

	public ControlPanelPage(WebDriver driver) {
		super(driver);
	}
	
	public HomePage goToHomePage() {
		hrefOrderTickets = driver.findElement(hrefOrderTicketsLocator);
		wait.until(ExpectedConditions.elementToBeClickable(hrefOrderTicketsLocator));
		hrefOrderTickets.click();
		return new HomePage(driver);
	}

	private WebElement hrefOrderTickets;
}
